<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: Common functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__netconn__common.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Common functions<div class="ingroups"><a class="el" href="group__api.html">APIs</a> &raquo; <a class="el" href="group__sequential__api.html">Sequential-style APIs</a> &raquo; <a class="el" href="group__netconn.html">Netconn API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gab2bd1d5e633e14e428cfc0ca908d5e0c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab2bd1d5e633e14e428cfc0ca908d5e0c">netconn_new</a>(t)&#160;&#160;&#160;<a class="el" href="api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8">netconn_new_with_proto_and_callback</a>(t, 0, NULL)</td></tr>
<tr class="separator:gab2bd1d5e633e14e428cfc0ca908d5e0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1065e769f2276270722a7700182077bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga1065e769f2276270722a7700182077bc">netconn_peer</a>(c,  i,  p)&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,0)</td></tr>
<tr class="separator:ga1065e769f2276270722a7700182077bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37ec33522cfc26fa57251c33e4cebb3e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga37ec33522cfc26fa57251c33e4cebb3e">netconn_addr</a>(c,  i,  p)&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,1)</td></tr>
<tr class="separator:ga37ec33522cfc26fa57251c33e4cebb3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae56911e2d92bebf43d73e116530e41f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1">netconn_set_ipv6only</a>(conn,  val)</td></tr>
<tr class="separator:gae56911e2d92bebf43d73e116530e41f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf001c7d5fbf97c04eb1d9ac7d14c9c31"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaf001c7d5fbf97c04eb1d9ac7d14c9c31">netconn_get_ipv6only</a>(conn)&#160;&#160;&#160;(((conn)-&gt;flags &amp; <a class="el" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>) != 0)</td></tr>
<tr class="separator:gaf001c7d5fbf97c04eb1d9ac7d14c9c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaaba260d28d105fb4bce9185fd0300d91"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a> { , <br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a75d14318b91af7a452230189f47e5e1a">NETCONN_TCP</a> = 0x10, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91ae7efa7c4e50b7b381531a2136cd5a013">NETCONN_TCP_IPV6</a> = NETCONN_TCP | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a6b8ec191d69f7e639f4ab40779069636">NETCONN_UDP</a> = 0x20, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a655e1625cc7e6a93f1e3d2646f56a1e4">NETCONN_UDPLITE</a> = 0x21, 
<br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a7e0c3f566b3d4321b36b711b6b1ad6de">NETCONN_UDPNOCHKSUM</a> = 0x22, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a34ee1c89f6705462590a4fe2c9772d9e">NETCONN_UDP_IPV6</a> = NETCONN_UDP | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91aa9cabc9d90606b5c5939fcc02ac588c7">NETCONN_UDPLITE_IPV6</a> = NETCONN_UDPLITE | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a2c7f548d26f6c411f084b6c59247b60e">NETCONN_UDPNOCHKSUM_IPV6</a> = NETCONN_UDPNOCHKSUM | 0x08, 
<br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a0d828a7e9c1614d4cae56602b09f39e9">NETCONN_RAW</a> = 0x40
<br />
 }</td></tr>
<tr class="separator:gaaba260d28d105fb4bce9185fd0300d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad5c079af0ad791a92fe9dade375744f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0">netconn_prepare_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gad5c079af0ad791a92fe9dade375744f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab411221f912a6d9e4c82ac3963989403"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403">netconn_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab411221f912a6d9e4c82ac3963989403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230">netconn_bind</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa78479deeedcecd3bacade387ac40cc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5">netconn_bind_if</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t if_idx)</td></tr>
<tr class="separator:gaa78479deeedcecd3bacade387ac40cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacba7f74d973872ad0b88b9a96098cf77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77">netconn_connect</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:gacba7f74d973872ad0b88b9a96098cf77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50490bab058f4e740798beffcf48cabf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf">netconn_recv</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf)</td></tr>
<tr class="separator:ga50490bab058f4e740798beffcf48cabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9eccae90351eb6c3d2ca690068445d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4">netconn_err</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab9eccae90351eb6c3d2ca690068445d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5">netconn_gethostbyname_addrtype</a> (const char *name, <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u8_t dns_addrtype)</td></tr>
<tr class="separator:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>For use with TCP and UDP </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga37ec33522cfc26fa57251c33e4cebb3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37ec33522cfc26fa57251c33e4cebb3e">&#9670;&nbsp;</a></span>netconn_addr</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_addr</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">p&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,1)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="gaf001c7d5fbf97c04eb1d9ac7d14c9c31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf001c7d5fbf97c04eb1d9ac7d14c9c31">&#9670;&nbsp;</a></span>netconn_get_ipv6only</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_get_ipv6only</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn</td><td>)</td>
          <td>&#160;&#160;&#160;(((conn)-&gt;flags &amp; <a class="el" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>) != 0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) </p>

</div>
</div>
<a id="gab2bd1d5e633e14e428cfc0ca908d5e0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab2bd1d5e633e14e428cfc0ca908d5e0c">&#9670;&nbsp;</a></span>netconn_new</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_new</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">t</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8">netconn_new_with_proto_and_callback</a>(t, 0, NULL)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create new netconn connection </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td><a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1065e769f2276270722a7700182077bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1065e769f2276270722a7700182077bc">&#9670;&nbsp;</a></span>netconn_peer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_peer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">p&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,0)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="gae56911e2d92bebf43d73e116530e41f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae56911e2d92bebf43d73e116530e41f1">&#9670;&nbsp;</a></span>netconn_set_ipv6only</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_set_ipv6only</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { <span class="keywordflow">if</span>(val) { \</div><div class="line">  netconn_set_flags(conn, <a class="code" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>); \</div><div class="line">} <span class="keywordflow">else</span> { \</div><div class="line">  netconn_clear_flags(conn, <a class="code" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>); }} <span class="keywordflow">while</span>(0)</div><div class="ttc" id="api_8h_html_a60892e4eb139f10157847fea4266bf5b"><div class="ttname"><a href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a></div><div class="ttdeci">#define NETCONN_FLAG_IPV6_V6ONLY</div><div class="ttdef"><b>Definition:</b> api.h:87</div></div>
</div><!-- fragment --><p>TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gaaba260d28d105fb4bce9185fd0300d91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaba260d28d105fb4bce9185fd0300d91">&#9670;&nbsp;</a></span>netconn_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Protocol family and type of the netconn </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a75d14318b91af7a452230189f47e5e1a"></a>NETCONN_TCP&#160;</td><td class="fielddoc"><p>TCP IPv4 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91ae7efa7c4e50b7b381531a2136cd5a013"></a>NETCONN_TCP_IPV6&#160;</td><td class="fielddoc"><p>TCP IPv6 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a6b8ec191d69f7e639f4ab40779069636"></a>NETCONN_UDP&#160;</td><td class="fielddoc"><p>UDP IPv4 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a655e1625cc7e6a93f1e3d2646f56a1e4"></a>NETCONN_UDPLITE&#160;</td><td class="fielddoc"><p>UDP IPv4 lite </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a7e0c3f566b3d4321b36b711b6b1ad6de"></a>NETCONN_UDPNOCHKSUM&#160;</td><td class="fielddoc"><p>UDP IPv4 no checksum </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a34ee1c89f6705462590a4fe2c9772d9e"></a>NETCONN_UDP_IPV6&#160;</td><td class="fielddoc"><p>UDP IPv6 (dual-stack by default, unless you call <a class="el" href="group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1">netconn_set_ipv6only</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91aa9cabc9d90606b5c5939fcc02ac588c7"></a>NETCONN_UDPLITE_IPV6&#160;</td><td class="fielddoc"><p>UDP IPv6 lite (dual-stack by default, unless you call <a class="el" href="group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1">netconn_set_ipv6only</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a2c7f548d26f6c411f084b6c59247b60e"></a>NETCONN_UDPNOCHKSUM_IPV6&#160;</td><td class="fielddoc"><p>UDP IPv6 no checksum (dual-stack by default, unless you call <a class="el" href="group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1">netconn_set_ipv6only</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaaba260d28d105fb4bce9185fd0300d91a0d828a7e9c1614d4cae56602b09f39e9"></a>NETCONN_RAW&#160;</td><td class="fielddoc"><p>Raw connection IPv4 </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga63bcc4d7bd150674fa953a1253fa6230"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga63bcc4d7bd150674fa953a1253fa6230">&#9670;&nbsp;</a></span>netconn_bind()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_bind </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bind a netconn to a specific local IP address and port. Binding one netconn twice might not always be checked correctly!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to bind </td></tr>
    <tr><td class="paramname">addr</td><td>the local IP address to bind the netconn to (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses) </td></tr>
    <tr><td class="paramname">port</td><td>the local port to bind the netconn to (not used for RAW) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if bound, any other err_t on failure </dd></dl>

</div>
</div>
<a id="gaa78479deeedcecd3bacade387ac40cc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa78479deeedcecd3bacade387ac40cc5">&#9670;&nbsp;</a></span>netconn_bind_if()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_bind_if </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>if_idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bind a netconn to a specific interface and port. Binding one netconn twice might not always be checked correctly!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to bind </td></tr>
    <tr><td class="paramname">if_idx</td><td>the local interface index to bind the netconn to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if bound, any other err_t on failure </dd></dl>

</div>
</div>
<a id="gacba7f74d973872ad0b88b9a96098cf77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacba7f74d973872ad0b88b9a96098cf77">&#9670;&nbsp;</a></span>netconn_connect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_connect </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Connect a netconn to a specific remote IP address and port.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to connect </td></tr>
    <tr><td class="paramname">addr</td><td>the remote IP address to connect to </td></tr>
    <tr><td class="paramname">port</td><td>the remote port to connect to (no used for RAW) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise </dd></dl>

</div>
</div>
<a id="gab411221f912a6d9e4c82ac3963989403"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab411221f912a6d9e4c82ac3963989403">&#9670;&nbsp;</a></span>netconn_delete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_delete </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Close a netconn 'connection' and free its resources. UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate after this returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if the connection was deleted </dd></dl>

</div>
</div>
<a id="gab9eccae90351eb6c3d2ca690068445d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9eccae90351eb6c3d2ca690068445d4">&#9670;&nbsp;</a></span>netconn_err()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_err </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get and reset pending error on a netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to get the error from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>and pending error or ERR_OK if no error was pending </dd></dl>

</div>
</div>
<a id="gafb3494b149dff96ed8d1acb770ab52f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafb3494b149dff96ed8d1acb770ab52f5">&#9670;&nbsp;</a></span>netconn_gethostbyname_addrtype()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_gethostbyname_addrtype </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>dns_addrtype</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Execute a DNS query, only one IP address is returned</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>a string representation of the DNS host name to query </td></tr>
    <tr><td class="paramname">addr</td><td>a preallocated ip_addr_t where to store the resolved IP address </td></tr>
    <tr><td class="paramname">dns_addrtype</td><td>IP address type (IPv4 / IPv6) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK: resolving succeeded ERR_MEM: memory error, try again later ERR_ARG: dns client not initialized or invalid hostname ERR_VAL: dns server response was invalid </dd></dl>

</div>
</div>
<a id="gad5c079af0ad791a92fe9dade375744f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad5c079af0ad791a92fe9dade375744f0">&#9670;&nbsp;</a></span>netconn_prepare_delete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_prepare_delete </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Close a netconn 'connection' and free all its resources but not the netconn itself. UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate after this returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if the connection was deleted </dd></dl>

</div>
</div>
<a id="ga50490bab058f4e740798beffcf48cabf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga50490bab058f4e740798beffcf48cabf">&#9670;&nbsp;</a></span>netconn_recv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_recv </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetbuf.html">netbuf</a> **&#160;</td>
          <td class="paramname"><em>new_buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receive data (in form of a netbuf containing a packet buffer) from a netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn from which to receive data </td></tr>
    <tr><td class="paramname">new_buf</td><td>pointer where a new netbuf is stored when received data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data has been received, an error code otherwise (timeout, memory error or another error) </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
